<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function go({
            url,
            method="get"
        }){
            console.log(method);
            console.log(url);
        }
        go({})   // 默认情况下要传空对象
        go({url:"xxx"})
        go({
            method:"post",
            url:"post:xxx"
        })
    </script>
</body>
</html>